<template>
  <a-modal
      :close-on-click-modal="false"
      :open="api.detailState.visible"
      :title="api.detailState.title"
      destroy-on-close
      @cancel="api.onCloseDetail()"
      @ok="api.onCloseDetail()"
  >

    <a-descriptions :column="1" bordered >
      <a-descriptions-item label="类型名称：">{{ api.detailState.form.itemName }}</a-descriptions-item>
      <a-descriptions-item label="类型存储值：">{{ api.detailState.form.itemValue }}</a-descriptions-item>
      <a-descriptions-item label="类型编码：">{{ api.detailState.form.type }}</a-descriptions-item>
      <a-descriptions-item label="排序号：">{{ api.detailState.form.sortId }}</a-descriptions-item>
      <a-descriptions-item label="备注信息：">{{ api.detailState.form.description }}</a-descriptions-item>
    </a-descriptions>
  </a-modal>
</template>

<script setup lang="ts">
import {DicApi} from "~/api/system/dic.api";

interface Props {
  api: DicApi;
}

const { api } = withDefaults(defineProps<Props>(), {});

</script>

<style scoped lang="scss">

</style>
